package com.fzkj.shejimoshi.adapter3;

import com.fzkj.shejimoshi.adapter3.advancemedia.AbstractAdvanceMediaPlayer;
import com.fzkj.shejimoshi.adapter3.media.MediaPlayer;

/**
 * @DESCRIPTION: TODO
 * @AUTHOR: AnotherOne
 * @DATE: 2021/8/12 16:26
 */
public class MediaAdapter implements MediaPlayer, AbstractAdvanceMediaPlayer {

    AbstractAdvanceMediaPlayer advancePlayer;
    MediaPlayer mediaPlayer;

    public MediaAdapter(AbstractAdvanceMediaPlayer advancePlayer){
        this.advancePlayer = advancePlayer;
    }
    public MediaAdapter(MediaPlayer mediaPlayer){
        this.mediaPlayer = mediaPlayer;
    }

    @Override
    public void mp3(String fileName) {
        advancePlayer.playMp4(fileName);
    }

    @Override
    public void playMp4(String fileName) {
        mediaPlayer.mp3(fileName);
    }

}
